import request from '@/utils/request'

// 查询车辆级别列表
export function listRank(query) {
  return request({
    url: '/car/rank/list',
    method: 'get',
    params: query
  })
}

// 查询车辆级别详细
export function getRank(rankId) {
  return request({
    url: '/car/rank/' + rankId,
    method: 'get'
  })
}

// 新增车辆级别
export function addRank(data) {
  return request({
    url: '/car/rank',
    method: 'post',
    data: data
  })
}

// 修改车辆级别
export function updateRank(data) {
  return request({
    url: '/car/rank',
    method: 'put',
    data: data
  })
}

// 修改车辆级别状态
export function isAvailableRank(data) {
  return request({
    url: '/car/rank/isAvailableRank',
    method: 'put',
    data: data
  })
}
// 删除车辆级别
export function delRank(rankId) {
  return request({
    url: '/car/rank/' + rankId,
    method: 'delete'
  })
}

// 导出车辆级别
export function exportRank(query) {
  return request({
    url: '/car/rank/export',
    method: 'get',
    params: query
  })
}
